class ChatModel {
  late String message;
  late bool isMe;

  ChatModel({required this.message, required this.isMe});

  factory ChatModel.fromMe(String msg) {
    return ChatModel(message: msg, isMe: true);
  }

  factory ChatModel.fromOther(String msg) {
    return ChatModel(message: msg, isMe: false);
  }

  factory ChatModel.fromERR(String errmsg) {
    return ChatModel(message: errmsg, isMe: false);
  }

  bool get isThinking => message.isEmpty && !isMe;

  @override
  String toString() {
    return message;
  }
}
